package com.ctms.system.service.impl;

import com.ctms.system.dao.ClassMapper;
import com.ctms.system.domain.ClassDO;
import com.ctms.system.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ClassServiceImpl implements ClassService {

    @Autowired
    ClassMapper classMapper;

    @Override
    public List<ClassDO> selectAllClass(Map<String, Object> params) {
        return classMapper.selectAllClass(params);
    }

    @Override
    public int count(Map<String, Object> params) {
        return classMapper.count(params);
    }

    @Override
    public int insertClass(ClassDO classDO) {
        return classMapper.insertClass(classDO);
    }

    @Override
    public ClassDO selectById(Integer classId) {
        return classMapper.selectById(classId);
    }

    @Override
    public int updateClass(ClassDO classDO) {
        return classMapper.updateClass(classDO);
    }

    @Override
    public int deleteClass(Integer classId) {
        return classMapper.deleteClass(classId);
    }

    @Override
    public int countStudent(Integer classId) {
        return classMapper.countStudent(classId);
    }

    @Override
    public String selectIdByName(String name) {
        return classMapper.selectIdByName(name);
    }
}
